import requests
# from PIL import Image
# from io import BytesIO
# i = Image.open(BytesIO(r.conten))
# from bs4 import BeautifulSoup
# date = {'user':'18012345670',
#         'pwd':'123456',
#         }
import lxml
import html5lib
from bs4 import BeautifulSoup as bs
# # s = requests.session()
# # res = s.post('http://192.168.100.160/LoginWebAction',date)
# # print(requests.get('http://192.168.100.160/personal.html?navlist=0&listab=0#').text)
# # a = requests.get('https://www.eniucn.com/wap/p2p/admin')
# # a = bs(requests.get('http://www.eniucn.com').content).find({'id':'username'},'html5lib')
# # print(a)
#
# a = requests.get('http://www.eniucn.com').text
# # name =bs(a,'lxml').find_all('div',{'class':'loginBox'})
# # print(name)
# name = bs(a,'lxml').body.children
# print(name)
# for i in name:
#     print(i)
html = requests.get('http://www.lixingli.cn').text.encode('utf-8')
soup = bs(html,'lxml')
# for link in soup.find_all('i'):
    # print(link.get('href'))
    # print(link['class'])
    # print(len(link['class']))
    # count = 0
    # Fcount = 0
    # for i in range(len(link['class'])-1):
    #     # print(link['class'][i])
    #
    #     if link['class'][i] == 'fa fa-qq fa-lg':
    #         # print('True')
    #         count +=1
    #     else:
    #         # print('False')
    #         Fcount +=1
    # print(count,Fcount)

# print(soup.title.string.replace_with("No longer bold"))
for a in soup.find_all('span'):
    for c in range(len(a['class'])-1):
        # print(a['class'][c])
        if a['class'][c] == 'b-title':
            print(a.string)